import Vue from 'vue'
import Router from 'vue-router'
Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '*',
      redirect: '/'
    }, {
      path: '/',
      name: 'PageView',
      component: resolve => require(['@/view/PageView'], resolve),
      children: [
        {
          path: '/',
          redirect: '/service'
        }, 
        {
          path: '/login',
          name: 'login',
          component: resolve => require(['@/view/Login'], resolve),
          meta: {
            title: '登录'
          }
        },
        {
          path: '/home',
          name: 'home',
          component: resolve => require(['@/view/HomePage'], resolve),
          meta: {
            title: '首页'
          }
        }
        , {
          path: '/software',
          name: 'software',
          component: resolve => require(['@/view/Software'], resolve),
          meta: {
            title: '软件产品'
          },
          children: [
            {
              path: '/software',
              redirect: '/software/smartTown'
            },
            {
              path: '/software/smartTown',
              name: 'software',
              component: resolve => require(['@/view/Software_smartTown'], resolve),
              meta: {
                title: '软件产品丨智能小镇管理系统'
              }
            },
            {
              path: '/software/bigData',
              name: 'software',
              component: resolve => require(['@/view/Software_bigData'], resolve),
              meta: {
                title: '软件产品丨大数据管理系统'
              }
            }
          ]
        }, {
          path: '/service',
          name: 'service',
          component: resolve => require(['@/view/Service'], resolve),
          meta: {
            title: '相关服务'
          }
        }
        ,
        
         {
          path: '/newsinformation',
          name: 'newsinformation',
          component: resolve => require(['@/view/NewsInformation'], resolve),
          meta: {
            title: '新闻动态'
          }
        }, {
          path: '/companyintroduction',
          name: 'companyintroduction',
          component: resolve => require(['@/view/CompanyIntroduction'], resolve),
          meta: {
            title: '公司介绍'
          }
        }, 
        {
          path: '/ruan',
          name: 'ruan',
          component: resolve => require(['@/view/Ruan'], resolve),
          meta: {
            title: '软件产品'
          }
        }, 
        {
          path: '/jobchance',
          name: 'jobchance',
          component: resolve => require(['@/view/JobChance'], resolve),
          meta: {
            title: '我的订单'
          }
        }, 
        {
          path: '/contactus',
          name: 'contactus',
          component: resolve => require(['@/view/ContactUs'], resolve),
          meta: {
            title: '联系我们'
          }
        },
        {
          path: '/lianxi',
          name: 'lianxi',
          component: resolve => require(['@/view/Lianxi'], resolve),
          meta: {
            title: '联系我们'
          }
        },
        {
          path: '/xiang',
          name: 'xiang',
          component: resolve => require(['@/view/Xiang'], resolve),
          meta: {
            title: '详情',
            keepAlive:true
          }
        },
        {
          path: '/xiang2',
          name: 'xiang2',
          component: resolve => require(['@/view/Xiang2'], resolve),
          meta: {
            title: '详情',
            keepAlive:true
          }
        },
        {
          path: '/standard',
          name: 'standard',
          component: resolve => require(['@/view/Standard'], resolve),
          meta: {
            title: '标准查询'
          }
        },
        {
          path: '/one',
          name: 'one',
          component: resolve => require(['@/view/One'], resolve),
          meta: {
            title: '标准查询'
          }
        },
        {
          path: '/filelist',
          name: 'filelist',
          component: resolve => require(['@/view/FileList'], resolve),
          meta: {
            title: '资质'
          }
        },
        {
          path: '/jiance',
          name: 'jiance',
          component: resolve => require(['@/view/Jiance'], resolve),
          meta: {
            title: '检测'
          }
        },
        {
          path: '/jiliang',
          name: 'jiliang',
          component: resolve => require(['@/view/JiLiang'], resolve),
          meta: {
            title: '计量'
          }
        },
        {
          path: '/jifengood',
          name: 'jifengood',
          component: resolve => require(['@/view/JifenGood'], resolve),
          meta: {
            title: '积分兑换'
          }
        },
        {
          path: '/newxq',
          name: 'newxq',
          component: resolve => require(['@/view/Newxq'], resolve),
          meta: {
            title: '详情'
          }
        },
        {
          path: '/upload',
          name: 'upload',
          component: resolve => require(['@/view/Upload'], resolve),
          meta: {
            title: '上传'
          }
        },
        {
          path: '/notice',
          name: 'notice',
          component: resolve => require(['@/view/Notice'], resolve),
          meta: {
            title: '消息通知'
          }
        },
        {
          path: '/product',
          name: 'product',
          component: resolve => require(['@/view/Product'], resolve),
          meta: {
            title: '产品列表'
          }
        },
        {
          path: '/konw',
          name: 'konw',
          component: resolve => require(['@/view/Konw'], resolve),
          meta: {
            title: '知识库'
          },
        },
        {
          path: '/konwxq',
          name: 'konwxq',
          component: resolve => require(['@/view/Konwxq'], resolve),
          meta: {
            title: '知识库详情'
          },
        },
        {
          path: '/jifen',
          name: 'jifen',
          component: resolve => require(['@/view/Jifen'], resolve),
          meta: {
            title: '积分兑换'
          },
        },
        {
          path: '/repair',
          name: 'repair',
          component: resolve => require(['@/view/Repair'], resolve),
          meta: {
            title: '维修与培训'
          },
        },
        {
          path: '/productxq',
          name: 'productxq',
          component: resolve => require(['@/view/Productxq'], resolve),
          meta: {
            title: '产品详情'
          },
        },
        {
          path: '/device',
          name: 'device',
          component: resolve => require(['@/view/Device'], resolve),
          meta: {
            title: '维修与培训'
          },
        },
        {
          path: '/file',
          name: 'file',
          component: resolve => require(['@/view/File'], resolve),
          meta: {
            title: '资质中心'
          }
        },
        {
          path: '/person',
          name: 'person',
          component: resolve => require(['@/view/Person'], resolve),
          meta: {
            title: '个人中心'
          }
        },
        {
          path: '/servicedetail',
          name: 'servicedetail',
          component: resolve => require(['@/view/ServiceDetail'],resolve),
          meta: {
            title: '相关服务'
          }
        }
      ]
    }
  ]
})
